Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter out conversations with invalid topics #495

Merged
merged 7 commits into from
Nov 30, 2023

Conversation

rygine
Copy link
Collaborator

@rygine rygine commented Nov 28, 2023

resolves #491

@rygine rygine requested a review from a team November 28, 2023 21:12
Copy link

cloudflare-workers-and-pages bot commented Nov 28, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3691bfc
Status: ✅  Deploy successful!
Preview URL: https://3edfe0ce.xmtp-js.pages.dev
Branch Preview URL: https://rygine-filter-invalid-topics.xmtp-js.pages.dev

View logs

@rygine
Copy link
Collaborator Author

rygine commented Nov 28, 2023

unit tests pending, but wanted to confirm logic beforehand.

tests added

describe('topic utils', () => {
describe('isValidTopic', () => {
it('validates topics correctly', () => {
expect(isValidTopic(buildContentTopic('foo'))).toBe(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the robust tests. It might be helpful to just generate a bunch of random topics (the way we do when creating invites) and ensure that those all pass as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good callout!

added random topic tests here: test: add random topic testing

@rygine rygine force-pushed the rygine/filter-invalid-topics branch from f3f94af to 01757fb Compare November 29, 2023 20:21
@rygine rygine merged commit e96b2e2 into main Nov 30, 2023
7 checks passed
@rygine rygine deleted the rygine/filter-invalid-topics branch November 30, 2023 22:56
Copy link
Contributor

🎉 This PR is included in version 11.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

github-actions bot commented Dec 5, 2023

🎉 This PR is included in version 11.3.0-beta.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Conversations with invalid topics should not be included in the conversation list
2 participants